﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Media.Imaging;
using System.Windows;
using System.Windows.Media.Effects;
using System.Windows.Media;
using System.Windows.Controls;

namespace CommomFunctions
{
    public class FuncoesVariadas
    {
        //public static BitmapSource loadBitmap(System.Drawing.Bitmap source)
        //{
        //    return System.Windows.Interop.Imaging.CreateBitmapSourceFromHBitmap(source.GetHbitmap(), IntPtr.Zero, Int32Rect.Empty, System.Windows.Media.Imaging.BitmapSizeOptions.FromEmptyOptions());
        //}

        public static void setaLinhasEColunas(System.Windows.UIElement objeto, Grid grid, int coluna, int colunaSpan, int linha, int linhaSpan)
        {
            grid.Children.Add(objeto);
            Grid.SetColumn(objeto, coluna);
            Grid.SetColumnSpan(objeto, colunaSpan);
            Grid.SetRow(objeto, linha);
            Grid.SetRowSpan(objeto, linhaSpan);
            
        }
    }
}
